package com.example.demo.controller;

import com.example.demo.common.base.BaseResponse;
import com.example.demo.pojo.FcSysLogDO;
import com.example.demo.service.FcSysLogService;
import com.example.demo.utils.RespBean;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
@CrossOrigin
@RestController
@RequestMapping("/syslog")
public class SystemLogController {
    @Resource
    FcSysLogService fcSysLogService;
    @PostMapping("/today")
    public RespBean getToday()
    {
        List<FcSysLogDO> todaySysLog = fcSysLogService.getTodaySysLog();
        return RespBean.success(todaySysLog);
    }
}
